package concurrensy;

import concurrensy.producer_consumer.Consumer;
import concurrensy.producer_consumer.Producer;
import concurrensy.producer_consumer.RingBuffer;
import concurrensy.producer_consumer.RingBufferWithLockAndCondition;
import concurrensy.producer_consumer.RingBufferWithSynchronized;


public class Main {

	public static void main(String[] args) {		
		RingBuffer buffer = new RingBufferWithLockAndCondition(5);
		Thread producer = new Thread(new Producer(buffer, 1000));
		Thread consumer1 = new Thread(new Consumer(buffer, 5000));
		Thread consumer2 = new Thread(new Consumer(buffer, 5000));
		producer.start();
		consumer1.start();
		consumer2.start();
	}
}
